<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button>get请求</button>
</body>
</html>
<script src="./lib/jquery.js"></script>
<script>
    $(function () {
        $('button').on('click',function () {
            $.get({
                url:'https://autumnfish.cn/api/joke/list',
                // 利用对象结构传参
                data: {
                    num: 10
                },
                success: function (backData) {
                    console.log(backData);
                }
            })

            $.get({
                url:'https://autumnfish.cn/api/joke/list',
                // 利用字符串结构传参
                data: 'num=20',
                success: function (backData) {
                    console.log(backData);
                }
            })
        })
    })
</script>

